<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
      <el-form-item label="原始内容">
        <el-input
            v-model="data"
            placeholder="请输入内容"
            clearable
        />
      </el-form-item>
      <el-form-item label="加密内容">
        <el-input
            v-model="code"
            placeholder=""
            clearable
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="handleQuery">查询</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import {encryption} from "@/api/tool/md5.js";

const data = ref(null);
const code = ref(null);

const handleQuery = () => {
  encryption({data: data.value}).then((res) => {
    code.value = res.data;
  })
};
</script>
